/*	PureMVC AS3 / Flex Demo - Slacker 
	Copyright (c) 2008 Clifford Hall <clifford.hall@puremvc.org>
	Your reuse is governed by the Creative Commons Attribution 3.0 License */
package mvc
{
	import org.puremvc.as3.patterns.facade.Facade;
	import mvc.controller.StartupCommand;
	import com.tools.traceTool.TraceTool;

	public class ApplicationFacade extends 	Facade
	{
		public static const STARTUP:String = "startup";
		private function Trace(...args):void{TraceTool.send('yTrace',String(Object(this).constructor),args);}
		public static function getInstance():ApplicationFacade
		{
			if(instance==null)instance=new ApplicationFacade();
			TraceTool.send('yTrace',String(Object(instance).constructor),'	ApplicationFacade.getInstance()')
			return instance as ApplicationFacade;
		}
		override protected function initializeController():void
		{
			Trace('	initializeController()');
			super.initializeController();
			registerCommand(STARTUP, StartupCommand);
		}
		public function startup(app:ArtG):void
		{
			Trace('		START	sendNotification	',STARTUP,app);
			sendNotification(STARTUP,app);
			Trace('		FINISH	sendNotification()	',STARTUP,app);
		}
	}
}